<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改商品文件')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-file-edit" th:object="${productFile}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">商品编号
                ：</label>
            <div class="col-sm-8">
                <input name="productId" th:field="*{productId}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">文件类型：</label>
            <div class="col-sm-8">
                <select name="fileType" class="form-control m-b"
                        th:with="type=${@dict.getType('product_file_type')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                            th:value="${dict.dictValue}" th:field="*{fileType}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">文件编号
                ：</label>
            <div class="col-sm-8">
                <input name="fileNo" th:field="*{fileNo}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">排序
                ：</label>
            <div class="col-sm-8">
                <input name="fileSort" th:field="*{fileSort}" class="form-control"
                       type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "product/file";
    $("#form-file-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-file-edit').serialize());
        }
    }
</script>
</body>
</html>